var wvChart = new(function(){
	this.radar = function(objId,arg){
		
		AmCharts.makeChart(objId,{
		  	"type": "radar",
		  	"colors":["#ff8209"],
		  	"dataProvider": [{
				"direction": arg[0].title,
				"value": arg[0].value
			},{
			    "direction": arg[1].title,
				"value": arg[1].value
		  	},{
			    "direction": arg[2].title,
				"value": arg[2].value
		  	},{   
			    "direction": arg[4].title,
				"value": arg[4].value
		  	},{
			    "direction": arg[3].title,
				"value": arg[3].value
		  	},{
			    "direction": arg[5].title,
				"value": arg[5].value
			},{
		    	"direction": arg[6].title,
				"value": arg[6].value
		  	},{
		    	"direction": arg[7].title,
				"value": arg[7].value
		  	},{
			    "direction": arg[8].title,
				"value": arg[8].value
		  	},{
			    "direction": arg[9].title,
				"value": arg[9].value
		  	}],
		  	"valueAxes": [{
				"minimum": 0,
				"maximum":100,
				"autoGridCount": true,
				"axisAlpha": 0.1,
				"fillAlpha": 0,
				"gridAlpha": 0.1,
				"color":"#3f5c6f"
		  	}],
		  	"startDuration": 0,
		  	"graphs": [{
				"balloonText": "[[category]]: [[value]]",
				"bullet": "round",
				"fillAlphas": 0.6,
				"valueField": "value"
		  	}],
		  	"categoryField": "direction",
			"export": {
				"enabled": true
		  	}
		});
	};
	this.barSerial = function(objId,arg){
		AmCharts.makeChart(objId,{
			"type": "serial",
		  	"dataProvider": [ {
			    "country": arg[0].title,
			    "visits": arg[0].value,
			    "color": "#d94d4d"
		  	},{
			    "country": arg[1].title,
			    "visits": arg[1].value,
			    "color": "#d9824d"
		  	},{
			    "country": arg[2].title,
			    "visits": arg[2].value,
			    "color": "#eba438"
		  	},{
			    "country": arg[3].title,
			    "visits": arg[3].value,
			    "color": "#a6a438"
		  	},{
			    "country": arg[4].title,
			    "visits": arg[4].value,
			    "color": "#4ab3d2"
		  	},{
			    "country": arg[5].title,
			    "visits": arg[5].value,
			    "color": "#69c6ff"
		  	}],
		  	"valueAxes": [{
				"minimum": 0,
				"maximum":100,
				"autoGridCount": true,
				"axisAlpha": 0.1,
				"fillAlpha": 0,
				"gridAlpha": 0.1,
				"color":"rgba(0,0,0,.3)"
		  	}],
		    "gridAboveGraphs": true,
		  	"startDuration": 1,
		  	"graphs": [{
			    "balloonText": "<b>[[category]]: [[value]]</b>",
			    "fillColorsField": "color",
			    "fillAlphas": 1,
			    "lineAlpha": 0,
			    "type": "column",
			    "valueField": "visits"
		  	}],
		  	"chartCursor": {
		    "categoryBalloonEnabled": false,
			    "cursorAlpha": 0,
			    "zoomable": true
		  	},
		  	"categoryField": "country",
		  	"categoryAxis": {
			   "gridPosition": "start",
		        "axisAlpha": 0,
				"fillAlpha": 0,
		        "gridAlpha": 0,
		        "color":"#3f5c6f"
		  	},
		  	"export": {
		    	"enabled": true
		  	}
		});
	};
	this.lineSerial = function(objId,arg){
		AmCharts.makeChart(objId,{
		    "type": "serial",
		    "colors":["#1b7ced"],
		    "dataProvider": [{
		        "title": arg[0].title,
		        "value": arg[0].value,
		    }, {
		        "title": arg[1].title,
		        "value": arg[1].value,
		    }, {
		        "title": arg[2].title,
		        "value": arg[2].value,
		    }, {
		        "title": arg[3].title,
		        "value": arg[3].value,
		    }],
		    "valueAxes": [{
		        "integersOnly": true,
		        "reversed": false,
		        "position": "left",
	
				"minimum": 0,
				"maximum":100,
				"autoGridCount": true,
				"axisAlpha": 0.1,
				"fillAlpha": 0.1,
				"gridAlpha": 0.1,
				"color":"rgba(0,0,0,.3)"
		    }],
		    "startDuration": 0.5,
		    "graphs": [ {
		        "balloonText": "[[category]]: [[value]]",
		        "bullet": "round",
		        "title": "value",
		        "valueField": "value",
				"fillAlphas": 0
		    }],
		    "chartCursor": {
		        "cursorAlpha": 1,
		        "zoomable": false
		    },
		    "categoryField": "title",
		    "categoryAxis": {
		        "gridPosition": "start",
		        "axisAlpha": 0,
				"fillAlpha": 0,
		        "gridAlpha": 0,
		        "color":"#3f5c6f"
		    },
		    "export": {
		    	"enabled": true,
		        "position": "bottom-right"
		    }
		});
	};
});


